package ar.com.psicosoft.model.psicosoft_admin;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the permiso database table.
 * 
 */
@Embeddable
public class PermisoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="\"idPersona\"", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer idPersona;

	@Column(name="\"idServicio\"", insertable=false, updatable=false, unique=true, nullable=false)
	private Integer idServicio;

	public PermisoPK() {
	}
	public Integer getIdPersona() {
		return this.idPersona;
	}
	public void setIdPersona(Integer idPersona) {
		this.idPersona = idPersona;
	}
	public Integer getIdServicio() {
		return this.idServicio;
	}
	public void setIdServicio(Integer idServicio) {
		this.idServicio = idServicio;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof PermisoPK)) {
			return false;
		}
		PermisoPK castOther = (PermisoPK)other;
		return 
			this.idPersona.equals(castOther.idPersona)
			&& this.idServicio.equals(castOther.idServicio);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idPersona.hashCode();
		hash = hash * prime + this.idServicio.hashCode();
		
		return hash;
	}
}